package com.ccb.jyzx.expand.tiantouonline.utils;

import java.util.Random;
import java.util.UUID;

/**
 * @author XIEFEI
 * @date 2018-11-20 16:43
 * @Description ID生成工具
 **/
public class IDUtils {
  private   static  Random r = new Random();
    public static String createId(){

        return UUID.randomUUID().toString().replace("-","");
    }
    public static String createNumId(int len){
        StringBuilder sb = new StringBuilder("");
        if (len>0){
            for (int i = 0; i <len ; i++) {
                int i1 = r.nextInt(10);
                sb.append(i1);
            }
        }
        return sb.toString();
    }

}
